import java.util.Stack;

/**
 * This class works as stack
 * which does DFS algorithm
 * @author ldong
 *
 * @param <E>
 */
public class MyStack<E> implements DataStructure<E> 
{
    private Stack<E> myStack;
    /**
     * Constructor
     */
    public MyStack()
    {
    	myStack = new Stack<E>(); 
    }
	
	@Override
	public void add(E item) {
        myStack.push(item);
	}

	@Override
	public E remove() {
		return myStack.pop();
	}

	@Override
	public boolean isEmpty() {
		return myStack.isEmpty();
	}

}
